const { Model, DataTypes, Sequelize } = require('sequelize')
const db = require('../core/db')
class Img extends Model {

}

Img.init({
    url: {
        type: DataTypes.STRING,
        allowNull: false,
        validate: {
            notEmpty: {
                msg: 'url不能为空'
            },
        },
        comment: "图片url"
    },
}, {
    sequelize: db,
    modelName: 'Img' // 我们需要选择模型名称
})
module.exports = Img
